package com.taomeishu.mailcrazy.checkers;

import com.taomeishu.mailcrazy.AbstractMailExistChecker;
import com.taomeishu.mailcrazy.checkers.qq.QQResultParser;
import com.taomeishu.mailcrazy.parser.ResultParser;
import com.taomeishu.mailcrazy.util.RandomUtil;

public class QQMailExistChecker extends AbstractMailExistChecker {

	private String baseUrl = "http://zc.qq.com/cgi-bin/iframe/qqmailreg/check_mail?email=";
	
	private String referer = "http://zc.qq.com/iframe/2/reg.html";
	
	private QQResultParser resultParser = new QQResultParser();
	
	@Override
	protected String makeRequestUrl(String username, String domainName) {
		return baseUrl + username + "@" + domainName + "&r=" + RandomUtil.getRandomDouble();
	}

	@Override
	protected boolean usePostMethod() {
		return false;
	}

	@Override
	protected ResultParser getResultParser() {
		return resultParser;
	}

	@Override
	protected String getReferer() {
		return referer;
	}

}
